package S06;
public class Cylinder implements Computable { //圆柱体
	private double radius, height;
	public Cylinder(double radius, double height) {
		this.radius=radius;
		this.height=height;
	}
	@Override
	public String getResult() {
		double area=2*Math.PI*radius*(radius+height);
		double volume=Math.PI*radius*radius*height;
		return String.format("半径是%.2f，高度是%.2f的圆柱体，其表面积为%.2f，体积为%.2f", radius, height, area, volume);
	}
}
